HAL NO_OS How to Use

group NO_OS_How_To_Use

How to use the OS HAL module driver

Use the OS HAL driver as follows:

  1. Create a semaphore or mutex:

    • Create a new semaphore instance using the HAL_OS_SemaphoreCreate() function.

    • Create a new mutex instance using the HAL_OS_MutexCreate() function.

    • A semaphore or a mutex is a simple uint32 variable that is set atomically.

  2. Delete a semaphore or mutex:

    • Delete a semaphore instance using the HAL_OS_SemaphoreDelete() function.

      • The HAL_OS_SemaphoreDelete() API ensures that memory operations have been completed using the Data Memory Barrier instruction “__DMB()” before resetting the semaphore.

    • Delete a mutex instance using the HAL_OS_MutexDelete() function.

      • The HAL_OS_MutexDelete() API ensures that memory operations have been completed using the Data Memory Barrier instruction “__DMB()” before resetting the semaphore.

  3. Take the semaphore or mutex when required:

  4. Release the semaphore or mutex: